package com.alks.function.mapper.stockdept.pcfactorystockquery;

import com.alks.entity.data.entity.PcSlipTemp;
import com.alks.entity.data.entity.PcSupplementDetail;
import com.alks.entity.data.entity.PcSupplementSize;
import com.alks.entity.data.entity.SdBomPartNew2;
import com.alks.function.data.dto.stockdept.pcfactorystockwork.SpPartDto;
import com.alks.function.data.dto.stockdept.pcfactorystockwork.StyMtlDto;
import com.alks.function.data.request.stockdept.pcfactorystockwork.OMtlwaitAddRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.SpPartRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.StyMtlRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ms
 * @since 2023-09-26
 */
@Mapper
public interface SD_SQ_SdBomPartNew2Mapper extends BaseMapper<SdBomPartNew2> {

    /*获取补料部位数据*/
    List<SpPartDto> getSpPartQuery(String lotNo);

    /*追加时补料部位回显查询*/
    String getSpPartAppQuery(@Param("details") List<PcSupplementSize> details, @Param("lotNo") String lotNo);

    /*新增用补料部位数据查询*/
    List<SdBomPartNew2> getPartAddQuery(@Param("request") SpPartRequest request, @Param("companyId") String companyId);

    /*获取型体数据*/
    List<StyMtlDto> getStyMtlQuery2(StyMtlRequest request);

    /*待入库新增查询*/
    List<PcSlipTemp> getOtMtlWaitStk2(List<OMtlwaitAddRequest> request);

    /*获取需要删除的数量*/
    List<SdBomPartNew2> selectDelQty(@Param("companyId") String companyId, @Param("detail") PcSupplementDetail detail);
}
